<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head><title>Unilever Reports</title>
<link href="./css/styles.css"
rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="#{request.contextPath}/themes/#{layoutBean.theme}/skin.css" />
</h:head>
<h:body>
<h:form>
	<p:ajaxStatus style="width:1px;height:1px;">
		<f:facet name="start">
			<p:graphicImage value="ajax-loader.gif" />
		</f:facet>
		<f:facet name="complete">
			<h:outputText value="" />
		</f:facet>
	</p:ajaxStatus> 
	<p:panel header="Search Options" toggleable="true" toggleOrientation="vertical" collapsed="true">  
   <p:panelGrid columns="4" style="margin-bottom:10px" cellpadding="5">  
  		<f:facet name="header">  
        Search Options
    	</f:facet>  
  
        <h:outputText value="Name: " />  
        <p:inputText value="#{logsManagedBean.name}"></p:inputText>  
  
        <h:outputText value="Message: " />  
        <p:inputText value="#{logsManagedBean.msg}"></p:inputText> 
  
        <h:outputText value="Date      From: " />  
 		<p:calendar id="from"  styleClass="calendarFilter" pattern="dd-MMM-yy" value="#{logsManagedBean.from}" showOn="button">
        </p:calendar>
        <h:outputText value="To: " />
        <p:calendar id="to"  styleClass="calendarFilter" pattern="dd-MMM-yy" value="#{logsManagedBean.to}" showOn="button">
        </p:calendar>
     
    </p:panelGrid>
     <p:commandButton value="GO" update="dataTable" action="#{logsManagedBean.updateList}" /> 
     </p:panel>   
  
  
<p:dataTable id="dataTable" style="margin-top:5px" var="log" value="#{logsManagedBean.logs}"  
                 paginator="true" rows="20"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="10,20,30,40,50" sortOrder="descending" lazy="true" scrollable="false" scrollHeight="600" paginatorPosition="top">  
        <f:facet name="header">  
            Chub Logs  
        </f:facet> 
        <p:column sortBy="#{log.issueDate}" width="150">  
            <f:facet name="header">  
                    Date 
            </f:facet>  
            #{log.issueDate}  
        </p:column>  
  
        <p:column>
            <f:facet name="header" width="150">  
                    Name  
            </f:facet>  
            #{log.tableName} 
        </p:column>  
  
        <p:column>   
            <f:facet name="header" width="450">  
                    Message  
            </f:facet>  
            #{log.msg}  
        </p:column>  
   
    </p:dataTable>
    </h:form>  
    <p:ajaxStatus style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">  
    <f:facet name="start">  
        <p:graphicImage value="ajax-loader.gif" />  
    </f:facet>  
  
    <f:facet name="complete">  
        <h:outputText value="" />  
    </f:facet>  
</p:ajaxStatus>  
    </h:body>
    </html>